import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

import HomePage from '../pagse/home'
import LoginPage from '../pagse/login'
import RegisterPage from '../pagse/register'
import IndexPage from '../pagse/index'
import PayPage from '../pagse/pay'
import ProSearchPage from '../pagse/pro_search.vue'
import PayFailurePage from '../pagse/pay_failure.vue'
import PaySuccessPage from '../pagse/pay_success.vue'
import ProCategoriesPage from '../pagse/pro_categories.vue'
import ShopCartPage from '../pagse/shop_cart.vue'
import ProDetails from '../pagse/pro_details'
import ConfirmPage from '../pagse/confirm'
import UserPage from '../pagse/user'
import ProList from '../pagse/pro_list'
import OrderPage from '../pagse/order.vue'

export default new VueRouter({
    routes: [{
        path: '/',
        redirect: '/login',
    }, {
        path: '/home',
        name: 'home',
        component: HomePage,
    }, {
        path: '/prolist',
        name: 'prolist',
        component: ProList,
    }, {
        path: '/login',
        name: 'login',
        component: LoginPage,
    }, {
        path: '/register',
        name: 'register',
        component: RegisterPage,
    }, {
        path: '/index',
        name: 'index',
        component: IndexPage,
    }, {
        path: '/confirm',
        name: 'confirm',
        component: ConfirmPage,
    }, {
        path: '/pay',
        name: 'pay',
        component: PayPage,
    }, {
        path: '/pro_search',
        name: 'pro_search',
        component: ProSearchPage,
    }, {
        path: '/pay_failure',
        name: 'pay_failure',
        component: PayFailurePage,
    }, {
        path: '/pay_success',
        name: 'pay_success',
        component: PaySuccessPage,
    }, {
        path: '/user',
        name: 'user',
        component: UserPage,
    }, {
        path: '/pro_categories',
        name: 'pro_categories',
        component: ProCategoriesPage,
    }, {
        path: '/shop_cart',
        name: 'shop_cart',
        component: ShopCartPage,
    }, {
        path: '/order',
        name: 'order',
        component: OrderPage,
    }, {
        path: '/prodetails',
        name: 'prodetails',
        component: ProDetails,
    }]
})